<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
    <link rel="stylesheet" href="__ROOT__/static/admin/css/myorder/order.css">
    <link rel="stylesheet"  href="__ROOT__/static/plugins/bootstrap/css/bootstrap.css">
    <script type="text/javascript" src="__ROOT__/static/plugins/jquery-3.2.1/jquery-3.2.1.js"></script>
    <script  src="__ROOT__/static/plugins/layer/layer.min.js"></script>
</head>
<body>
    <div class="show-head">
        用户ID：<input  type="text" id="user_id"  value=""/>
        订单号：<input type="text" id="order_num" value=""/>
        订单状态：<input type="text" id="order_status" value="" />
        <button id="but">查询</button>
    </div>
     <!--订单列表-->
    <div>
        <table class="table table-hover table-striped table-bordered">
            <tr>
                <th>订单ID</th>
                <th>用户ID</th>
                <th>订单号</th>
                <th>商品名</th>
                <th>商品价格</th>
                <th>订单数量</th>
                <th>订单总结</th>
                <th>订单时间</th>
            </tr>
         {volist  name="order" id="v"}
            <tr>
            <td>{$v.id}</td>
            <td>{$v.user_id}</td>
            <td>{$v.order_num}</td>
            <td>{$v.goods_name}</td>
            <td>{$v.goods_price}</td>
            <td>{$v.goods_num}</td>
            <td>{$v.order_amount}</td>
            <td>{$v.add_time|date="Y-m-d H:i:s",###}</td>
         </tr>
         {/volist}
            <tr>
                <td colspan="9" align="center">{$page}</td>
            </tr>
        </table>
    </div>
</body>
</html>
<script>
    $(function(){
        /*
        * 搜素*/
        $('#but').click(function(){
            var data = {};
                data.order_type = $('#user_id').val();
                data.order_num = $('#order_num').val();
                data.order_status = $('#order_status').val();
//            console.dir(data);
            $.ajax({
                cache:true,
                type:"POST",
                url:"{:url('admin/Order/order')}",
                dataText:"text",
                data:data,
                async:false,
                success:function(data){
                   console.dir(data);
                }
            })
        });

        });
    /*
     * 删除*/
  /*  function del(id){
        var goods = {};
        goods.id = id;
        layer.confirm('确定要删除吗?',{
            btn:['确定','取消']
        },function(){
            $.post("{:url('admin/Order/remove')}", goods, function(data){
                if(data > 0){
                    layer.msg('删除成功', {icon:1});
                    setTimeout('location.href="{:url(\'admin/Goods/index\')}"',2500);
                }else{
                    layer.msg('删除失败', {icon:1});
                }
            });
        });
    }*/
</script>